const https = require('https');

// 替换以下变量
const VERCEL_TOKEN = 'ZuWUGNqzIZrdzmgwUaymehWp';
const PROJECT_ID = 'prj_8OFHMQjZRWZru0B05a1G0MCIDgtT';

const data = JSON.stringify({
  name: 'Gitee Auto Deploy',
  branch: 'main'
});

const options = {
  hostname: 'api.vercel.com',
  path: '/v9/projects/prj_8OFHMQjZRWZru0B05a1G0MCIDgtT/deploy-hooks',
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ZuWUGNqzIZrdzmgwUaymehWp',
    'Content-Type': 'application/json'
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => {
    data += chunk;
  });
  res.on('end', () => {
    console.log('Response:', data);
  });
});

req.on('error', (error) => {
  console.error('Error:', error);
});

req.write(data);
req.end(); 